Expand description
tzdb — Time Zone Database
tzdb v0.2.14 and higher re-export tzdb v0.5
Static time zone information for tz-rs.
This crate provides all time zones found in the Time Zone Database.
Usage examples
use tz::{DateTime, TimeZone};
use tzdb::{time_zone, tz_by_name};
// access by identifier
DateTime::now(time_zone::europe::KYIV);
// access by name
DateTime::now(tz_by_name("Europe/Berlin").unwrap());
// names are case insensitive
DateTime::now(tz_by_name("ArCtIc/LongYeArByEn").unwrap());
Feature flags
Modules
Changes between the versions
serde_as
serde-as-1
or serde-as-2
Helper functions to be used with
serde
and serde_with
serde_as_1
serde-as
Helper functions to be used with
serde
and serde_with (v1.x.y)
serde_as_2
serde-as-2
Helper functions to be used with
serde
and serde_with (v2.x.y)
All defined time zones statically accessible
Constants
A list of all known time zones
The version of the source Time Zone Database
The SHA512 hash of the source Time Zone Database (using the “Complete Distribution”)
Functions
Find the time zone of the current system
Find the raw, unparsed time zone data by name, e.g.
"Europe/Berlin"
(case-insensitive)Find a time zone by name, e.g.
"Europe/Berlin"
(case-insensitive)